package br.com.raxataxi.hibernatUtil;

import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.tool.hbm2ddl.SchemaExport;

/**
 *
 * @author CPD
 */
@SuppressWarnings("deprecation")
public class gerarBanco {

    public static void main(String[] a) {

        try {
            AnnotationConfiguration cfg = new AnnotationConfiguration().configure();
            SchemaExport ex = new SchemaExport(cfg);
            ex.create(true, true);
            System.out.println("Banco Gerado com Sucesso");
        } catch (Exception e) {
            e.printStackTrace();
            System.out.println("Banco não Gerado");
        }

    }
}
